<template>
    <div class="userinfo">
      <Navbar></Navbar>
      <img src="../images/userinfo_bg.png" class="backImg"/>
      <user-detail :userinfo="model"></user-detail>
    </div>
</template>

<script>
  import Navbar from '@/components/common/Navbar.vue'
  import userDetail from '../components/userComponents/userDetail'
    export default {
    components:{
      Navbar,
      userDetail
    },
        name: "userInfo",
        data() {
            return {
              model:{},
            }
        },
        methods: {
          async UserinfoData(){
            console.log("jinlaile")
            const res = await this.$http.get('/user/'+ localStorage.getItem('id'))
            this.model = res.data[0]
            console.log(this.model)
          }
        },
      created() {
        this.UserinfoData()
      },
    }
</script>

<style scoped lang="less">
  .userinfo{
    .backImg{
      width: 100%;
      height: 24.66667vw;
    }
  }
</style>
